package com.example.keepserver.model;

import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.OneToMany;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import java.time.LocalDateTime;
import java.util.List;

@Data
@Entity
@Table(name = "users")
public class User {
    
    @Id
    private String userId;
    
    private String nickname;
    private String avatarUrl;
    private String gender;
    private String location;
    private Integer followerCount;
    private Integer followingCount;
    private Integer postCount;
    private LocalDateTime createdAt;
    
    @Column(name = "password")
    private String password;
    
    @Column(name = "email", nullable = true)
    private String email;
    
    @OneToMany(mappedBy = "user", cascade = CascadeType.ALL)
    private List<Activity> activities;
} 